Shader "Custom/SpriteWaveEffect" {
    Properties {
        _MainTex("Texture", 2D) = "white" {}
        _Amplitude("Amplitude", Float) = .05
        _Speed("Speed", Float) = 1.
    }

    SubShader {
        Tags { "Queue" = "Transparent" }

        Pass {
            CGPROGRAM
            #pragma vertex vert
            #pragma fragment frag

            #include "UnityCG.cginc"

            struct appdata {
                float4 vertex : POSITION;
                float2 uv : TEXCOORD;
            };

            struct v2f {
                float2 uv : TEXCOORD;
                float4 vertex : SV_POSITION;
            };

            sampler2D _MainTex;
            float _Amplitude;
            float _Speed;

            v2f vert(appdata v) {
                v2f o;
                o.vertex = UnityObjectToClipPos(v.vertex);
                o.uv = v.uv;

                // Add wave effect here
                o.vertex.y += sin(_Time.y * _Speed)*_Amplitude;

                return o;
            }

            fixed4 frag(v2f i) : SV_Target {
                return tex2D(_MainTex, i.uv);
            }
            ENDCG
        }
    }
}